package com.feibiao.computer;
public class ChengFang implements Operate {
    private double result;
    @Override
    public double compute(double operator2,double operator1) {
        if ((int)operator1 != 0){
            result = operator1;
            for (int i = 1;i < (int)operator2;i++){
                result *= operator1;
            }
        }else if((int)operator2 == 0){
            result = 1;
        }
        return result;
    }
    @Override
    public double compute(double operator) {
        return 0;
    }
}
